home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / Moof / Goodies / MPW Goodies / MPW Goodies⁄DTS / GetLastChange < prev    next >
Text File  |  2022-08-05  |  868b  |  32 lines

  1. #    GetLastChange - find the previous change in a window
  2. #
  3. #    Usage:    GetLastChange window [commentFile]
  4. #
  5. #    Status:    GetLastChange may return the following status values:
  6. #
  7. #            0        the change was extracted
  8. #            1        error
  9. #
  10. #    GetLastChange extracts a change from the window into the file,
  11. #    commentFile. The change is found at the LastChange marker.
  12.  
  13. Set Exit 0
  14. Set CaseSensitive 0
  15. Begin
  16.  
  17.     Set Window "{1}"                    # get change from this file (must be open window)
  18.     Set Comment "{2}"                    # get comment in this file (should not be open)
  19.  
  20.     Find ΔLastChange "{Window}"            # get the comment
  21.     If {Status} == 0
  22.         Find /∂t[¬∂t]+∂t+[¬∂t]+∂t+/Δ:/∞/ "{Window}"
  23.         Catenate "{Window}.§" >"{Comment}"
  24.     Else
  25.         Echo -n >"{Comment}"            # no comment at all
  26.         Find • "{Window}" && Mark /•∂tChange History:[ ∂t]*∂n[ ∂t]*∂n/Δ LastChange "{Window}"
  27.         If {Status} != 0
  28.             Exit 1
  29.         End
  30.     End
  31. End ∑Dev:Null
  32.